#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QtGui/QMainWindow>
#include <QtXml>
#include <QTableWidget>
#include "environment.h"
#include <QCheckBox>
#include <QDialog>
#include "techparameter.h"
#include "editwidget.h"

#include "mymodel.h"

#include "smssend.h"

namespace Ui
{
    class MainWindow;
};


struct CheckStruct
{
    QCheckBox *checkBox;
    QPushButton *button;
    unsigned int group;
    unsigned int param;
    bool isGroup;
};


class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();


private:
    Ui::MainWindow *ui;
    SmsSend *smsSend;
    QDomDocument doc;
    //CEnvironment env;
    QList<CheckStruct> checkBoxes;
    bool needCheckBoxRedraw;

    QTableWidget *table;


    void loadEnv(QString filename);

    CEditWidget *editor;

public slots:
    void reloadConfig();
private slots:
    void on_actionSendSMS_2_triggered();
};

#endif // MAINWINDOW_H
